#include  < stdio.h >
#include  < stdlib.h >
#include  < conio.h >

 int  find( char   * s, char   * m)
 {
    char *p=s;
    char *q=m;
    int i=0,j=0;
    while(p!=NULL)
    {
        if(*q==0) break;
        else{
            if(*p==*q)
            {
                p++; q++; i++; j++;
            }
            else
            {
                p++; q=q-i; i=0; j++;
            }
        }
    }
    return j-i+1;    
}

 int  main()
 {
    char *s="adsdfadagfaghfahgjsarewragfjsgjsgmcvhjtyijhgjd";
    char *m="jsg";
    int i;
    i=find(s,m);
    printf("%d ",i);
    getch();
    return 0;
}

